Relationships between U.S. economic indicators, recessions and stock prices by Perry Radau


This project is an exploration of U.S. economic indicators and how they may be used to predict recessions and perhaps stock market declines. I will look at three indicators: retail sales changes, industrial production changes, and Treasury spread (the difference between short and long-term government bond rates). I will illustrate some relationships between these factors, recession periods and stock market (S&P 500) prices since 1970.

Univariate Plots Section


The first dataset is Real Retail and Food Services Sales, (% change from year ago, monthly, seasonally adjusted). This gives an indication of economic health because retail sales changes are very sensitive to economic conditions. Therefore we can expect that retail sales will decline in poor times and pick up good times. The total volume is less important because it is affected by other trends like population and demographic changes.



This demonstrates retail and food sales (% change, monthly). It is apparent that there are large swings in this indicator due to the cyclical nature of retail sales. It is also very noisy data, which will prove a challenge to extracting meaningful signal for predicting stock prices. The red line indicates the median, and the dashed lines are the quartiles.

##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
## -11.500   0.200   2.500   2.156   4.600  19.000


The above summary statistics and histogram demonstrate that retail sales changes has a distribution that is somewhat narrower than Gaussian and with a longer negative tail, though the median (dashed line) is positive. This suggests that I should use percentiles for my choice of thresholds rather than standard deviations.


The next dataset is the Industrial Production Index, (% change from year ago, monthly, seasonally adjusted). This economic indicator is important as it indicates the growth or decline in heavy industry production (e.g. manufacturing). I would expect that it would decline prior to recessions and increase as the economy begins growing again.

##       Date            Industrial_Production
##  Min.   :1919-01-01   Min.   :-33.700      
##  1st Qu.:1943-03-24   1st Qu.:  0.000      
##  Median :1967-06-16   Median :  3.700      
##  Mean   :1967-06-16   Mean   :  3.833      
##  3rd Qu.:1991-09-08   3rd Qu.:  8.200      
##  Max.   :2015-12-01   Max.   : 62.000      
##                       NA's   :12
##       Date            Industrial_Production
##  Min.   :1950-01-01   Min.   :-15.20       
##  1st Qu.:1966-06-23   1st Qu.:  0.60       
##  Median :1982-12-16   Median :  3.30       
##  Mean   :1982-12-16   Mean   :  3.28       
##  3rd Qu.:1999-06-08   3rd Qu.:  6.40       
##  Max.   :2015-12-01   Max.   : 27.80


This demonstrates industrial production growth (% change, monthly). Like retail sales it is a indicator of the cyclical nature of the economy. It is apparent that there are large swings in this indicator and will also prove a challenge to extracting meaningful signal for predicting stock prices. The red line indicates the median, and the dashed lines are the quartiles.

##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##  -15.20    0.60    3.30    3.28    6.40   27.80


The above summary statistics and histogram demonstrate that changes in Industrial Production has a distribution that has some similarities to retail sales, i.e. somewhat narrower than Gaussian (excess kurtosis) but this time with a long positive tail. Like retail sales, the median (dashed line) is positive. This suggests that I should use percentiles for my choice of thresholds rather than standard deviations.



The next dataset is the Standard & Poor’s 500 (S&P 500), an American stock market index based on the market capitalizations of 500 large companies having common stock listed on the NYSE or NASDAQ stock exchanges.


This demonstrates that the long-term trend of the major market index for the U.S. stocks (S & P 500) Price (log scale) appears to increase approximately linearly with Date. There are also very large deviations from this trend upward (e.g. late 1990’s) and downward (2007-2008) which can be described as “bull” and “bear” market periods.

##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   17.05   84.12  145.30  486.40  963.60 2107.00


The above summary statistics and histogram demonstrate that S&P500 has a Rayleigh-style distribution which is common to datasets where the variable (Price in this case) increases exponentially. The median (dashed line) is shown, however, without a transformation this and most statistics will not be useful.


Changing the scale for S&P500 to a log scale produces this distribution. It is still not Gaussian, but perhaps shows a bi-modal distribution.



This histogram of S&P500 since year 2000 illustrates that if we narrow the time interval considerably then we begin to see a distribution more similar to Gaussian, however, even in this time period there appears to be a 2nd peak (mode) at the high Price end. For interest I’ve plotted the median (dashed black line), the peak from the dot-com technology boom ($1498, blue line, year 2000) and the current Price ($1881, red line). It may at first appear concerning that we are at the upper end of the distribution, except that we do expect the historical trend of exponentially increasing prices to continue and not revert back to the median for this 15 year interval.

The next dataset shows the 10-Year Treasury Rate (percent, monthly). The Treasury yield is the interest rate the U.S. government pays to borrow money for the given term. The 10 Year Treasury is considered “medium” term meaning that the lending period is intermediate and therefore the rate is higher than shorter term Treasuries.

An interesting point is that the rates on these government bonds are in the bottom quartile since the mid-2000’s. Some believe the trend has reversed some time in 2015. The black curve is the 10 month simple moving average (SMA), which is a rolling 10 month window for calculating the average which is useful to see the smooth, long-term trend.

##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   1.530   4.220   6.100   6.396   7.880  15.270


The histogram for the 10 Year Treasury Rate shows that it is skewed to lower rates with a tail of high rates. The most interesting point is how low the current rate (2.1%, red line) is compared to the median (dashed line) and the rest of the distribution.



The next dataset shows the 3-Month Treasury Rate (percent, monthly). Like the 10-Year Treasury this is a government backed credit instrument, except in this case the term is very short and consequently the risk and rate are relatively low. The 3-Month Treasury Rate is often called the “risk-free” rate because these credit instruments have extremely low risk of default.

The black curve is the 10 month simple moving average (SMA). In this case the rates have hit the floor (almost 0%) since the crisis of 2008-9. Contrast this with the >10% rates in the ’80s. Overall it is apparent that this shorter term (3 month) has a lower rate than the longer term (10 year) but the difference between the two (the “spread”) varies with time. I’ll investigate this further in Bivariate Plots.

##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   0.010   2.000   4.215   4.346   5.910  16.300


The histogram for the 3 Month Treasury Rate shows that it is skewed to lower rates with a long tail of high rates, with a very high peak for the lowest end (<0.25%). The most interesting point is how low the current rate (0.23%, red line) is compared to the median (dashed line) and the rest of the distribution.


Bivariate Plots Section


This demonstrates that the beginning of official recessions (intervals indicated in red) tend to coincide closely with the beginning of a bear market (where a >20% downturn occurs). The black curve shows the 10 month simple moving average.


This graph illustrates how the 2001 recession (red interval) was preceded by the S&P500 stock index (black) falling below 3 month Simple Moving Average (SMA) shown in green, the 6 month SMA (red) and the 10 month SMA. One point of interest is that the stock index declined prior to the recession and therefore just predicting the start of a recession will not necessarily protect from large declines in stock price.

It’s also interesting to note that although the Price falling below the 3 month SMA (crossover) is an earlier predictor of the later decline than the 6month SMA or 10month SMA crossovers, the 3 month SMA crossover when used as a predictor would produce many false positives e.g. the July 1999 crossover. The reason I choose to use the 10 month SMA in later work is that the crossover of Price below the 10month SMA rarely occurs and is more indicative of a large decline.


This graph shows a similar pattern of SMA crossover preceding the 2007-2008 recession. The recession (red interval) was preceded by the S&P500 stock index (black) falling below 3 month Simple Moving Average (SMA) shown in green, the 6 month SMA (red) and the 10 month SMA (blue). In this graph it can also be seen that endpoint of the recession nearly coincides with the crossover of S&P500 moving above the 10 month SMA, around March 2009.


Recently the S&P500 has also dipped below the 10month SMA, both in August 2015 and January 2016. This raises the important question as to whether the U.S. is now on the verge of a recession.


Since we’ve seen that Price falling below the 10 month SMA usually coincides with a major decline in S&P500 index, and sometimes precedes a recession (red interval), I decided to plot this Difference (blue).


This graph illustrates the time periods when the S&P500 stock index changes from positive conditions to negative conditions. The Price curve is colored according to the % Difference relative to the 10 month SMA (green positive, red negative), excluding large values (> abs(2.5%)) in order to highlight the critical periods.

##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##  -2.600   0.580   1.620   1.558   2.590   4.580


The histogram for the Treasury Spread illustrates that the spread between rates is nearly typical for this time period with the current spread (2%, red line) just a little above the median (1.6%, dashed line). This contrasts sharply with the very low spread (-0.24%, blue line) at the start of 2007 and the beginning of the financial crash.



The treasury spread (difference between 10 year Treasury rate and 3 month treasury rate) is thought to be a good predictor of recessions. Notice that when the treasury spread has recently had a low (especially <0) and then turns up this often precedes a recession (red intervals).

Multivariate Plots Section


This plot demonstrates that the treasury spread shows predictive value for recessions. For the purpose of smoothing out noise, I’m plotting the 3month simple moving average curve and using it for the predictive calculations. I’ve created a Probability of Recession factor which indicates high risk if the spread is in the bottom quartile and its rate of change (slope) is rising; or the spread is negative (called “inverted yield curve” by economists). These points are plotted as red on the graph and tend to precede a recession. Based on this predictor it would appear that we are in no danger of a recession due to the current (Jan 2016) spread exceeding the median (red line).


This plot illustrates a method of using Retail Sales (% change from year ago) as a predictor of recessions in a manner similar to the previous Treasury spread graph. I’ve created a Probability of Recession factor which indicates high probability if Retail Sales is below the 35th percentile (blue line) and its rate of change (slope) is decreasing. (This criterion is based on a simple observation of the historical data, i.e. “back-testing”.) These “high probability of recession” points are plotted as red on the graph and tend to precede a recession, though there are more false warnings than with the treasury spread predictor. As of today (Jan 2016) the retail sales predictor is not yet warning of recession.


This plot illustrates a method of using Industrial Production as a predictor of recessions in a manner similar to the previous graphs. I’m plotting the 6 month simple moving average of Industrial Production (% change from year ago) and using it for the predictive calculations. I’ve created a Probability of Recession factor which indicates high probability if Industrial Production is below the median (red line) and its rate of change (slope) is decreasing. (This criterion is based on a simple observation of the historical data, i.e. “back-testing”.) These “high probability of recession” points are plotted as red on the graph and tend to precede a recession. Unfortunately this predictor which was very useful historically has many false warnings in this modern era, especially compared with either the treasury spread or retail sales predictors. As of today (Jan 2016) the industrial production predictor is warning of recession due to the downward trend below the bottom quartile contrary to the other predictors. However, there have been many false positive warnings in the past (e.g. 70’s and 80’s) and it provided almost no prior warning for the 2008 recession.


Final Plots and Summary


Plot One


Description One

This plot illustrates a method of using Retail Sales as a predictor of recessions. The data is smoothed by a 3 month simple moving average of Retail Sales and this is also used for the predictive calculations. The Retail Sales median (black horizontal line) and quartiles (dashed lines) are shown. A Recession Likelihood factor was calculated which indicates high probability if Retail Sales is below the 35th percentile (blue line) and its rate of change (slope) is decreasing. (This criterion is based on a simple observation of the historical data, i.e. “back-testing”.) These “high probability of recession” months (red) tend to precede a recession, though there are some false warnings e.g. early 70’s. As of today (Jan 2016) the retail sales predictor is not yet warning of recession. The recent downward trend toward the threshold (red line) that would trigger a warning is concerning but this happened many times in the ’90s without a recession.

Plot Two



Description Two


This plot demonstrates that the Treasury Spread shows predictive value for recessions. The Treasury Spread is defined by the difference in the 10 year Treasury Rate and the 3 month Treasury Rate. The data has been smoothed using the 3 month simple moving average and this was also used for the calculation of a Probability of Recession factor. The time periods indicated by the gray bars are U.S. recessions as defined by the National Bureau of Economic Research. The Recession Probability indicates high risk if the spread is in the bottom quartile (below red line) and its rate of change (slope) is rising; or the spread is below zero, which economists call a “inverted yield curve”. These high risk months (red points) tend to precede or coincide with a recession. Based on this predictor it would appear that we are in no danger of a recession due to the current (Jan 2016) spread far exceeding the bottom quartile.

Plot Three



Description Three


This is a plot of the Standard & Poor’s 500 (S&P 500), an American stock market index based on the market capitalizations of 500 large companies having common stock listed on the NYSE or NASDAQ. The time periods indicated by the gray bars are U.S. recessions as defined by the research of the National Bureau of Economic Research based on economic (fundamental) indicators not directly related to stock price. Based on a study of the Treasury Spread and Retail Sales (see earlier plots), a “Recession Likelihood” indicator was calculated and used to color the S&P500 price plot. Low Likelihood (green) indicates low expectation of a recession in following months; conversely high (red) or medium (orange) likelihood indicates a recession is imminent in the next few months or is already underway. The plot illustrates that the stock market often falls dramatically (>20% correction or “bear” market) after a recession begins, which underlines the importance of predicting recessions. The Recession Likelihood predictor is reasonably accurate in forecasting recessions in this time period (1970-today) with a minimal number of false positives. In conclusion, monitoring the Recession Likelihood predictor may assist U.S. stock investors, who for instance could adopt a more conservative portfolio when there is a warning of a recession.


References


Federal Reserve Economic Data
Link: https://research.stlouisfed.org

Yahoo Finance
Link: http://finance.yahoo.com

Technical Trade Rules package (TTR)
Link: https://cran.r-project.org/web/packages/TTR/index.html

Wikipedia: Historical U.S. Recessions
Link: https://en.wikipedia.org/wiki/List_of_recessions_in_the_United_States

Smith, Noah. “Economists get closer to spotting recessions.” BloombergView website.
Link: http://www.bloombergview.com/articles/2016-01-27/economists-close-in-on-spotting-future-recessions

Reflection


The purpose of my project was to explore and summarize several fundamental U.S. economic health indicators and how they relate to recessions and a stock market index. The indicators I chose were based on economic factors that my reading had indicated might be useful to predict recessions, and thereby predict stock market corrections: retail sales changes, industrial production changes, and treasury rates.

The first challenge was obtaining the data. I found these sources: Federal Reserve Economic Data website for economic indicators, Yahoo Finance website for S&P500 stock price data, and Wikipedia website for manual creation of a recession dates table. A 2nd challenge was aligning the time series data. For example, the start and end dates for each time series differ but must agree especially for calculating a combined predictor. Also the Yahoo Finance data was in time-reversed (descending) order. A 3rd challenge was making use of time series data effectively. To smooth the data for the purpose of forecasting, we do not wish to smooth by the regular algorithm which would include both future and past time points to contribute to the current value of our predictor. Therefore I required advanced time series algorithms as provided by the TTR package (Technical Trade Rules). This package also was necessary to obtain slopes of time-series curves. A 4th challenge was that it was difficult to research and develop unusual plotting constructs, such as the rectangles which I used to plot the recession intervals. A final challenge I will mention is that it was often difficult to track down the exact plotting feature required in the documentation and other R websites due to the vast variety of options available.

I believe I suceeded in the project to demonstrate that two economic indicators (Retail Sales and Treasury Spread) are useful in predicting recessions as well as major stock market corrections. I also disproved that in the modern era (since 1970) the Industrial Production indicator is useful for predicting recessions, despite evidence of its historical value, which could be understood as the result of a shift away from reliance on heavy industry for economic growth and toward other industries (e.g. high tech and retail).

The future work that would improve my analysis particularly for stock market investors would be to show that by using the Recession Likelihood indicator the investor could rebalance their portfolio and thereby avoid major drawdowns in wealth that occur during recessions. This could be developed into a market timing indicator, particularly in combination with other factors, for example the signal when S&P500 index crosses below the 10 month simple moving average. There is a general consensus that market timing (i.e. choosing when to sell to avoid drawdowns and buy to partake in gains) is very difficult. Nevertheless this research may show that market timing only in relation to recessions would prove worthwhile.